package com.dongdong.api;

import com.dongdong.fallback.SellerFallBack;
import com.dongdong.model.TbSeller;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

//在feing-api项目中的SellerAPI接口中使用UserClientFallbackFactory
@FeignClient(value = "dongdong-seller-service", fallbackFactory = SellerFallBack.class)
public interface SellerAPI {

    @GetMapping("seller/getSellerByName")
    public TbSeller getSellerByName(@RequestParam String username);
    //注意,使用Feign调用的时候参数一定要加上注解否则会出现一些错误     如果是post请求可能会变成get请求
}
